<?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2018/10/20
 * Time: 12:47
 */

namespace Consumer\Controller;


use Common\Controller\AdminbaseController;
use Common\Model\ContactModel;

class ContactController extends AdminbaseController
{
    private $contact_model;

    public function __construct()
    {
        parent::__construct();
        $this->contact_model    = new ContactModel();
    }

    public function lists() {
        $count = $this->contact_model->count();

        $page = $this->page($count, C("page_number"));

        $result = $this->contact_model->limit($page->firstRow, $page->listRows)->order('id desc')->select();

        $this->assign('list', $result);
        $this->display();
    }
}